(function(){
    Ext.QuickTip.prototype.tagConfig.url = 'qurl';

	Ext.override(Ext.QuickTip, {

        /*
        // private
        onTargetOver : function(e){
            if(this.disabled){
                return;
            }
            this.targetXY = e.getXY();
            var t = e.getTarget();
            if(!t || t.nodeType !== 1 || t == document || t == document.body){
                return;
            }
            if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){
                this.clearTimer('hide');
                this.show();
                return;
            }
            if(t && this.targets[t.id]){
                this.activeTarget = this.targets[t.id];
                this.activeTarget.el = t;
                this.anchor = this.activeTarget.anchor;
                if(this.anchor){
                    this.anchorTarget = t;
                }
                this.delayShow();
                return;
            }
            var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace;
            if(ttp = this.getTipCfg(e)){
                var autoHide = et.getAttribute(cfg.hide, ns);
                this.activeTarget = {
                    el: t,
                    text: ttp,
                    width: et.getAttribute(cfg.width, ns),
                    autoHide: autoHide != "user" && autoHide !== 'false',
                    title: et.getAttribute(cfg.title, ns),
                    cls: et.getAttribute(cfg.cls, ns),
                    align: et.getAttribute(cfg.align, ns),
                    url: et.getAttribute(cfg.url, ns) // new attribute
                };
                this.anchor = et.getAttribute(cfg.anchor, ns);
                if(this.anchor){
                    this.anchorTarget = t;
                }
                this.delayShow();
            }
        },

        urlBodyUpdate: function(t){
            var u, url = t.url;
            if(url){
                u = this.body.getUpdater();
                u.update({
                    scope: this,
                    url: url,
                    callback: function(el, success, response, options){
                        if(success){
                            var o = {}, et = Ext.fly(t.el), cfg = this.tagConfig, ns = cfg.namespace;
                            if(et){
                                o[ns+':'+cfg.attribute] = response.responseText;
                                o[ns+':'+cfg.url] = ''; // remove qurl to not be loaded many times
                                et.set(o);
                                if(!t.width){
                                    this.doAutoWidth();
                                }
                            }
                        }
                    }
                });
            }
        },

        */

        // private
        urlBodyUpdate: function(t){
            var u, url, et = Ext.fly(t.el), cfg = this.tagConfig, ns = cfg.namespace;
            url = et.getAttribute(cfg.url, ns);
            if(url){
                u = this.body.getUpdater();
                u.update({
                    scope: this,
                    url: url,
                    callback: function(el, success, response, options){
                        if(success && (et = Ext.fly(t.el))){
                            // found the element again, is changed when move fast through elements
                            var o = {};
                            o[ns+':'+cfg.attribute] = response.responseText; // set
                            o[ns+':'+cfg.url] = ''; // remove qurl to not be loaded many times
                            et.set(o);
                            if(!t.width){
                                this.doAutoWidth();
                            }
                        }
                    }
                });
            }
        },

        showAt: Ext.QuickTip.prototype.showAt.createSequence(function(xy){
            var t = this.activeTarget;
            if(t){
                this.urlBodyUpdate(t);
            }
        })
    });
})();